package cn.stylefeng.guns.modular.gridsystem.mapper;

import cn.stylefeng.guns.modular.gridsystem.model.param.BizUploadScoreParam;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.stylefeng.guns.modular.gridsystem.entity.BizUploadScore;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 网关上报分数表 Mapper 接口
 *
 * @author ssy
 * @date 2021/09/14 11:47
 */
public interface BizUploadScoreMapper extends BaseMapper<BizUploadScore> {

    Page<Map<String,Object>> listMap(@Param("page") Page page, @Param("param") BizUploadScoreParam param, @Param("list") String[] list);

    /**
     * 根据开始时间、结束时间查询数据
     *
     * @author rdp
     * @date 2022/12/30 11:53
     */
    List<BizUploadScore> getScoreListByTime(@Param("deviceId") Integer deviceId,@Param("startTime") String startTime, @Param("endTime") String endTime);

    List<BizUploadScore> getScoresLately(Integer deviceId);
}
